If sendMessage(txtTextEdit.hWnd, EM_LIMITTEXT, 0, ByVal 0&) Then
End If
If sendMessage(txtWordWrap.hWnd, EM_LIMITTEXT, 0, ByVal 0&) Then
End If
End Sub
'
' Check to see whether the text has changed
'
Sub Form_QueryUnload (Cancel As Integer, UnloadMode As Integer)
Dim C As Control
Dim X As Integer
Set C = Me.ActiveControl
If sendMessage(C.hWnd, EM_GETMODIFY, 0, ByVal 0&) Then
X = MsgBox("The text in " & Caption & " has changed." & Chr(10) & Chr(10) & Chr(13) & "Do you wish to save the changes ?", MB_YESNOCANCEL + MB_ICONEXCLAMATION)
End If
Select Case X
Case IDYES
Call FileSave
Case IDCANCEL
Cancel = True
End Select
End Sub
'
' Make the text boxes fill the form
'
Sub Form_Resize ()
txtTextEdit.Width = Scalewidth
txtTextEdit.Height = ScaleHeight
txtWordWrap.Width = Scalewidth
txtWordWrap.Height = ScaleHeight
End Sub
Sub Form_Unload (Cancel As Integer)
Call Form_Deactivate
Call DeleteForm(Me) ' Call the cleanup handler to keep track of each instance
End Sub
Sub txtTextEdit_MouseDown (Button As Integer, Shift As Integer, X As Single, Y As Single)
If Button = MK_RBUTTON Then PopupMenu MDI.mnu_Edit, 0, X, Y
End Sub
Sub txtWordWrap_MouseDown (Button As Integer, Shift As Integer, X As Single, Y As Single)
If Button = MK_RBUTTON Then PopupMenu MDI.mnu_Edit, 0, X, Y